Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements wheel build with Manylinux for Linux.
Why is it needed?
When a Linux binary is built , it is linked against the standard libraries (libc, libstdc++ etc) of versions that are present on the built machine. Those libraries are forward compatible, namely it's possible to run the binary on machines which have standard libraries newer than ones against which this binary was built. But it's not backward compatible, i.e. the binary might fail on the machines with older libraries with errors like
[usr/lib/libstdc++.so.6: version GLIBCXX_3.4.29 not found]
.Currently since PyDP is built on Ubuntu 22, it fails to run on many older machines. We can choose Ubuntu 20, but there will be still problems with older machines.
What is the solution?
The common solution for Python packages which have C++ parts are built C++ with Manylinux docker images. Those are Docker images which contain old enough standard libraries, which improves compatibility.
For building cibuildwheel is used. This libraries manages build in Docker with Manylinux images.
Note: many common Python libs (e.g. Numpy, Matplolib) use cibuildwheel. Here) are some other examples.
What in this PR
It contains extending publish workflow with build on manylinux for Linux platform. Other platforms are not changed.
Namely it contains
build_PyDP_linux.sh
which installs bazel and runbuild_PyDP.sh
.setup.py
to callbuild_PyDP_linux.sh
for Linux.publish.yml
to use cibuildwheel on Linux